package com.zhaoyue.study.jdk;

import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 2017/3/6
 * Time: 15:20
 * To change this template use File | Settings | File Templates.
 */
public class StackTest {
    public static void main(String[] args) {

        Stack<String> stack = new Stack<String>();
        //stack.add("1");
        //stack.add("2");

        stack.push("1");
        stack.push("2");

        System.out.println(stack.get(0));
        System.out.println(stack.peek());
        System.out.println(stack.pop());
        System.out.println(stack.pop());


    }
}
